class Point{
  // 构造方法
  constructor(x, y) {
    this.x = x;
    this.y = y;
  }
  toString() {
    return `(${this.x},${this.y})`;
  }
}
let point = new Point('haha', 12);
console.log(point.toString())
console.log(typeof Point);//function
console.log(Point === Point.prototype.constructor);// true
// 类创建出来的对象，公用一个原型对象
let point1 = new Point(2, 3);
let point2 = new Point(3, 3);
console.log(point1.__proto__ === point2.__proto__); // true

console.log(Object.getPrototypeOf(point1) === Point.prototype); //获取指定对象的原型
